<template>
    <div>
        <HeroSearch @sousuo="getValue" />
        <HeroList :keyword="keyword"/>

    </div>
</template>

<script>
    import HeroList from '@/components/HeroList.vue';
    import HeroSearch from '@/components/HeroSearch.vue';
    export default {
        name:"Heros",
        data(){
            return{
                keyword:""
            }
        },
        components:{
            HeroList,
            HeroSearch
        },
       
        methods:{
            getValue(value){
                // console.log("我被调用了",value);
                //赋值
                this.keyword = value;
            }
            
        }
    }
</script>

<style scoped>

</style>